<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="com.diligreat.cache.Cache,java.util.HashMap" %>
<%@ include file="/WEB-INF/static/header.jsp" %>
<script type="text/JavaScript">
$(document).ready(function(){
	var strcookie=document.cookie;
	
	var str=strcookie.split(";");
	if(str.length==3)
	{
		var stre=str[0].split("=");
		if(stre.length>0)
		{
			if(stre[1]=='')
			{
				$('#regForm .bot .botLeft .botLeftSix div').attr('class','saveOff');
				$('#regForm .bot .botLeft .botLeftThree input').val('');
				$('#regForm .bot .botLeft .botLeftFour input').val('');
			}
			else
			{
				$('#regForm .bot .botLeft .botLeftThree input').val(stre[1]);
				$('#regForm .bot .botLeft .botLeftSix div').attr('class','saveOn');
			}
		}
		stre=str[1].split("=");
		if(stre.length>0)
		{
			if(stre[1]=='')
			{
				$('#regForm .bot .botLeft .botLeftSix div').attr('class','saveOff');
				$('#regForm .bot .botLeft .botLeftThree input').val('');
				$('#regForm .bot .botLeft .botLeftFour input').val('');
			}
			else
			{
				$('#regForm .bot .botLeft .botLeftFour input').val(stre[1]);
				$('#regForm .bot .botLeft .botLeftSix div').attr('class','saveOn');
			}
		}
	}
	
	$('#regForm .bot .botLeft .botLeftSix div').click(function(){
		if($(this).attr('class')=='saveOn')
		{
			$(this).attr('class','saveOff');
		}
		else
		{
			$(this).attr('class','saveOn');
		}
	});
	
	
	$('#regForm .bot .botLeft .botLeftSeven input').click(function(){
		if($('#regForm .bot .botLeft .botLeftSix div').attr('class')=='saveOn')
		{
			document.cookie="userId="+$('#regForm .bot .botLeft .botLeftThree input').val();
			document.cookie="userName="+$('#regForm .bot .botLeft .botLeftFour input').val();
		}
		else
		{
			document.cookie="userId=";
			document.cookie="userName=";
		}
	});
	
	$('#loginsubmitlineseven').click(function(){
		$('#regForm').submit();
	});
	
});
</script>
<div id="loginPage">
	<form id="regForm" action="${basePath}member/login_submit.htm" method="post">
		<div class="top">
			<div class="log"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getLoginorregister() %></div>
			<div class="line"></div>
		</div>
		<div class="bot">
			<div class="botLeft">
				<div class="botLeftOne"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getLogint() %></div>
				<div class="botLeftTwo"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getLogins() %></div>
				<div class="botLeftThree"><div class="left"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getEmailadress() %>:</div><div class="right"><input type="text" name="email"/>${errors['email'][0]}</div></div>
				<div class="botLeftFour"><div class="left"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getPassword()%>:</div><div class="right"><input type="text" name="pwd"/>${errors['pwd'][0]}</div></div>
				<div class="botLeftFive"><div class="left"></div><div class="right"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getIforgetmypassword() %></div></div>
				<div class="botLeftSix"><div class="saveOff"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getRememberme() %></div></div>
				<div class="botLeftSeven"><input type="hidden" name="submitFlag" value="true"/><input type="button" value="<%=Cache.cache.getEachTitle(session.getAttribute("lang")).getSignin() %>" id="loginsubmitlineseven"/></div>
			</div>
			<div class="botRight">
				<div class="botLeftOne"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getRegisterwithdiligreat() %></div>
				<div class="botLeftTwo">通过注册, 获取个性化的报告和观点,帮助您的公司提升绩效并保持竞争优势. 注册过程简单, 且不收取任何费用</div>
				<div class="botLeftThree"><ul><li>按照您的业务需求和兴趣获取研究报告推荐</li><li>按照您的业务需求和兴趣获取研究报告推荐</li><li>按照您的业务需求和兴趣获取研究报告推荐</li></ul></div>
				<div class="botLeftFour"><a href="${basePath}/member/register.htm"><%=Cache.cache.getEachTitle(session.getAttribute("lang")).getRegisterwithdiligreat() %></a></div>
			</div>
		</div>
	</form>
</div>
<%@ include file="/WEB-INF/static/footer.jsp" %>